//
//  Model.m
//  11213手机
//
//  Created by student on 16/3/7.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "Model.h"

@implementation Model


-(instancetype)initWithDict:(NSDictionary *)dict
{
    self=[super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+(instancetype)dictWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

+(NSArray *)ListGet
{
    NSString *path=[[NSBundle mainBundle]pathForResource:@"goods" ofType:@"plist"];
    NSArray *arr=[NSArray arrayWithContentsOfFile:path];
    
    
    NSMutableArray *mArr=[NSMutableArray array];
    
    for (NSDictionary *dict in arr) {
        Model *m=[Model dictWithDict:dict];
        [mArr addObject:m];
        
    }
    return mArr;
}
@end
